package com.xiaok.mobileredis;

import com.xiaok.mobileredis.filter.SensitiveFilter;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * @Classname SensitiveServiceUtil
 * @Description TODO
 * @Date 2020/9/20 21:21
 * @Created by xiaok
 */
@SpringBootTest
public class SensitiveServiceUtil {

    @Autowired
    SensitiveFilter sensitiveFilter;
    @Test
    public void test1(){
        //这是发的人比较初级的
        String text = "I'm a piece of shit，我就是傻逼呀，我个笨蛋，" + "留下不学无术的眼泪!!!!";
        text = sensitiveFilter.filter(text);
        System.out.println(text);//I'm a piece of ***，我就是***呀，我个***，留下不学无术的眼泪!!!!

        text = "I'm a piece of ☆sh☆it，我就是☆傻☆☆逼☆呀，@我个☆笨☆蛋，" +  "留下不学无术的眼泪!!!";
        text = sensitiveFilter.filter(text);
        System.out.println(text);//I'm a piece of ☆***，我就是☆***☆呀，@我个☆***，留下不学无术的眼泪!!!
    }
}
